﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Bee.Web;

namespace Bee.Models
{
    public class DataDict
    {
        #region Properties

        public Int32 Id { get; set; }
        public Int32 UserId { get; set; }
        public String Title { get; set; }
        public String Name { get; set; }
        public Int32 ParentId { get; set; }
        public DateTime ModifyTime { get; set; }

        #endregion
    }

    public class DataDictMapping
    {
        public int Id { get; set; }
        public int DataDictId { get; set; }
        public string OptionId { get; set; }
        public string OptionValue { get; set; }
        public bool EnableFlag { get; set; }
    }

    public class PrintTemplate
    {
        #region Properties

        public Int32 Id { get; set; }
        public String Title { get; set; }
        public Int32 PTType { get; set; }
        public Int32 Type { get; set; }
        public String Content { get; set; }
        public DateTime ModifyTime { get; set; }

        #endregion
    }

    public class BillType
    {
        #region Properties

        public Int32 Id { get; set; }
        public String Title { get; set; }
        public String Name { get; set; }
        public String Format { get; set; }

        #endregion

    }

    public class BillTypeConfig
    {
        #region Properties

        public Int32 Id { get; set; }
        public String BillType { get; set; }
        public Int32 BillDate { get; set; }
        public Int32 LastId { get; set; }
        public DateTime ModifyTime { get; set; }

        #endregion

    }

    public class Employee
    {
        #region Properties

        [Bee.Web.ModelProperty(OrderableFlag = true)]
        public Int32 Id { get; set; }

        [Bee.Web.ModelProperty(Description = "姓名", OrderableFlag = true,
            Queryable = true, QueryType = Bee.Web.ModelQueryType.Contains)]
        public String TrueName { get; set; }

        [Bee.Web.ModelProperty(Description = "工号", Queryable = true, QueryType = ModelQueryType.Contains)]
        public String WorkCode { get; set; }

        [Bee.Web.ModelProperty(Description = "用户名", OrderableFlag = false,
            MappingName = "AuthUserMapping", Queryable = true, QueryType = ModelQueryType.Equal)]
        public Int32 UserId { get; set; }

        [Bee.Web.ModelProperty(Visible = false)]
        public String NameSpell { get; set; }

        [Bee.Web.ModelProperty(Description = "部门", MappingName = "OrganizationMapping", Queryable = true, QueryType = ModelQueryType.Equal)]
        public Int32 DepartmentId { get; set; }

        [Bee.Web.ModelProperty(Description = "性别", OrderableFlag = false, MappingName = "SexInfo")]
        public int Sex { get; set; }

        [Bee.Web.ModelProperty(Description = "生日", Queryable = true, QueryType = Bee.Web.ModelQueryType.Between)]
        public DateTime? Birthday { get; set; }

        [Bee.Web.ModelProperty(Description = "民族")]
        public String Nation { get; set; }

        [Bee.Web.ModelProperty(Description = "政治面貌", MappingName = "PartyInfo")]
        public Int32 PartyId { get; set; }

        [Bee.Web.ModelProperty(Description = "文化程度", MappingName = "EducationInfo")]
        public Int32 EducationId { get; set; }

        [Bee.Web.ModelProperty(Description = "籍贯")]
        public String Jiguan { get; set; }

        [Bee.Web.ModelProperty(Description = "婚姻状况", MappingName = "MarriageInfo")]
        public Int32 MarryId { get; set; }

        [Bee.Web.ModelProperty(Description = "健康状况", MappingName = "HealthInfo")]
        public Int32 HealthId { get; set; }

        [Bee.Web.ModelProperty(Description = "身份证号")]
        public String ShenFenId { get; set; }

        public string Email { get; set; }

        [Bee.Web.ModelProperty(Description = "联系电话")]
        public String Phone { get; set; }

        [Bee.Web.ModelProperty(Description = "家庭地址")]
        public String Address { get; set; }
        [Bee.Web.ModelProperty(Description = "现居住地址")]
        public String Abode { get; set; }

        [Bee.Web.ModelProperty(Description = "个人简介")]
        public String Remark { get; set; }

        [Bee.Web.ModelProperty(Visible = false)]
        public bool DelFlag { get; set; }

        [Bee.Web.ModelProperty(Visible = false)]
        public DateTime CreateTime { get; set; }

        [Bee.Web.ModelProperty(Visible = false)]
        public DateTime UpdateTime { get; set; }

        [Bee.Web.ModelProperty(Visible = false)]
        public int OPId { get; set; }
        [Bee.Web.ModelProperty(Visible = false)]
        public string EPInfo { get; set; }

        [Bee.Web.ModelProperty(Visible = false, Description = "是否离职", MappingName = "是否", Queryable = true, QueryType = ModelQueryType.Equal)]
        public bool DimissionFlag { get; set; }

        [Bee.Web.ModelProperty(Visible = false)]
        public DateTime DimissionTime { get; set; }

        [Bee.Web.ModelProperty(Visible = false)]
        public DateTime EntryTime { get; set; }

        #endregion

    }

    public class Organization
    {
        #region Properties

        public Int32 Id { get; set; }
        public Int32 GroupId { get; set; }
        public String OrgCode { get; set; }
        public String Address { get; set; }
        public String Remark { get; set; }
        public Int32 OwnerEmployeeId { get; set; }

        #endregion

    }


    [Serializable]
    public class BeeMessage
    {
        #region Properties

        public Int32 Id { get; set; }

        [Bee.Web.ModelProperty(Queryable = true, QueryType = ModelQueryType.Equal)]
        public Boolean ReadFlag { get; set; }

        [Bee.Web.ModelProperty(Queryable = true, QueryType = ModelQueryType.Equal, MappingName = "消息类型")]
        public Int32 MessageType { get; set; }

        [Bee.Web.ModelProperty(Queryable = true, QueryType = ModelQueryType.Equal)]
        public Boolean DelFlag { get; set; }

        [Bee.Web.ModelProperty(Queryable = true, QueryType = ModelQueryType.Equal, MappingName="AuthUserMapping")]
        public Int32 Sender { get; set; }

        [Bee.Web.ModelProperty(Queryable = true, QueryType = ModelQueryType.Equal, MappingName = "AuthUserMapping")]
        public Int32 Receiver { get; set; }

        [Bee.Web.ModelProperty(Queryable = true, QueryType = ModelQueryType.Contains)]
        public String Content { get; set; }

        [Bee.Web.ModelProperty( Queryable = true, QueryType = ModelQueryType.Equal)]
        public DateTime SendTime { get; set; }

        #endregion

    }
}
